package com.wxzz.elearing.livetelecast.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wxzz.elearing.livetelecast.entity.PlatformLivetelecast;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 平台直播 Mapper 接口
 * </p>
 *
 * @author
 * @since 2021-04-02
 */
public interface PlatformLivetelecastMapper extends BaseMapper<PlatformLivetelecast> {

    /**
     * 根据直播流密钥获取对应的直播信息
     * @param streamName
     * @return
     */
    @Select("SELECT * FROM `platform_livetelecast` WHERE stream_name = #{streamName} AND deleted = 0")
    PlatformLivetelecast getByStreamName(@Param("streamName") String streamName);

}
